#! /usr/bin/env python3

from wordcloud import WordCloud
import jieba
import imageio

txt = """用皮影戏生动讲述航天故事，凭巧手抻出细如发丝的龙须面，借金雕技艺雕刻
        出百变呆萌的大熊猫……正在深圳举办的第十九届文博会展会现场，传承千年的非
        遗技艺大放异彩，来自全国各地的非遗展品吸引了不少观众与客商的驻足关注
    """
data = " ".join(jieba.lcut(txt))
im = imageio.imread('/Users/maxiao/Desktop/111.png')
img_cloud = WordCloud(mask=im, background_color='black', width=800, height=600, 
        font_path='/System/Library/Fonts/Supplemental/Songti.ttc')
img_cloud.generate(data)
img_cloud.to_file('word_cloud.png')
print("done!!!")

